package com.zyc.netty;

import com.zyc.bean.Hello;
import com.zyc.proxy.RpcClientProxy;
import com.zyc.remoting.transport.netty.client.NettyRpcClient;
import com.zyc.service.HelloService;

/**
 * @author zyc
 * @create 2022-06-04-20:37
 */
public class NettyClientMain {
    public static void main(String[] args) {
        NettyRpcClient nettyRpcClient = new NettyRpcClient();
        RpcClientProxy rpcClientProxy = new RpcClientProxy(nettyRpcClient);
        HelloService helloServiceProxy = rpcClientProxy.getProxy(HelloService.class);
        String hello = helloServiceProxy.hello(new Hello("你好世界", "来自netty"));
        System.out.println(hello);
    }
}
